namespace CSharpPro._0928;

public class Demo
{
    
    public void TestPrint()
    {
        for (int a = 100; a < 1000; a++)
        {
            int b = a / 100;
            int c = a / 10 % 10;
            int d = a % 10;
            if (b * b * b + c * c * c + d * d * d == a)
            {
                Console.WriteLine(a);
            }
        }
    }

    public void TestPrint2()
    {
        Console.WriteLine(2);
        for (int a = 3; a < 100; a++)
        {
            int b = 0;
            int c = 2;
            while (c < a)
            {
                if (a % c == 0)
                {
                    b = 1;
                }

                c++;
            }

            if (b == 0)
            {
                Console.WriteLine(c);
            }
            
        }
    }
}